﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace DramaLoad.Models
{
    public class RegisterViewModel
    {
        [Required(ErrorMessage="*Username can only contain letters,numbers and underscores(_)!")]
        [Display(Name = "Username")]
        public string usernameReg { get; set; }

        [StringLength(100, ErrorMessage = "*{0} must have at least {2} characters", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string passwordReg { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm Password")]
        [Compare("passwordReg", ErrorMessage = "*Your passwords don't match!")]
        public string passwordAgn { get; set; }

        [Required(ErrorMessage = "*You have input invalid email address!")]
        [EmailAddress(ErrorMessage ="*You have input invalid email address!")]
        [Display(Name = "Email Address")]
        public string emailText { get; set; }

        [Range(1900,2100,ErrorMessage ="*Please input valid birth year! Example:1900")]
        [Display(Name = "Birth Year")]
        public int birthYear { get; set; }

        [Required(ErrorMessage = "*Please choose your membership!")]
        [Display(Name = "Choose Membership")]
        public int membership { get; set; }
    }
}